﻿$(document).ready(function () {

    var isDeleteSubmitting = false;
    $("form.form-action-delete").on("submit", function (e) {
        if (isDeleteSubmitting) {
            isDeleteSubmitting = false;
            return true;
        }
        var form = $(this);
        bootbox.confirm("Biztos törölni szeretnéd?", function (result) {
            if (result) {
                isDeleteSubmitting = true;
                form.submit();
            }
        });
        return false;
    });
});